/*!
 *  navigationbar.less
 *
 *  copyright 2012 frapwings, kazuya kawaguchi (@kazu_pon)
 *  licensed under MIT license
 *  http://www.opensource.org/licenses/mit-license.php
 */


.navigationbar {
  // Fix for IE7's bad z-indexing so dropdowns don't appear below content that follows the navigationbar
  *position: relative;
  *z-index: 2;
  overflow: visible;
  margin-bottom: @baseLineHeight;
}

// Gradient is applied to it's own element because overflow visible is not honored by IE when filter is present
.navigationbar-inner {
  padding-left:  20px;
  padding-right: 20px;
  #gradient > .vertical(@navigationbarBackgroundHighlight, @navigationbarBackground);
  .border-radius(4px);
  @shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1);
  .box-shadow(@shadow);
}

// Set width to auto for default container
// We then reset it for fixed navigationbars in the #gridSystem mixin
.navigationbar .container {
  width: auto;
}

// navigationbar button for toggling navigationbar items in responsive layouts
.button-navigationbar {
  display: none;
  float: right;
  padding: 7px 10px;
  margin-left: 5px;
  margin-right: 5px;
  .buttonBackground(@navigationbarBackgroundHighlight, @navigationbarBackground);
  @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);
  .box-shadow(@shadow);
}

.button-navigationbar .icon-bar {
  display: block;
  width: 18px;
  height: 2px;
  background-color: #f5f5f5;
  .border-radius(1px);
  .box-shadow(0 1px 0 rgba(0,0,0,.25));
}

.button-navigationbar .icon-bar + .icon-bar {
  margin-top: 3px;
}

/*
// Override the default collapsed state
.navigation-collapse.collapse {
  height: auto;
}
*/


// Brand, links, text, and buttons
.navigationbar {
  color: @navigationbarText;
  // Hover and active states
  .product:hover {
    text-decoration: none;
  }
  // Website or project name
  .product {
    float: left;
    display: block;
    padding: 8px 20px 12px;
    margin-left: -20px; // negative indent to left-align the text down the page
    font-size: 20px;
    font-weight: 200;
    line-height: 1;
    color: @white;
  }
  // Plain text in topbar
  .navigationbar-text {
    margin-bottom: 0;
    line-height: @navigationbarHeight;
  }
  // Buttons in navigationbar
  .button,
  .button-group {
    .navigationbarVerticalAlign(30px); // Vertically center in navigationbar
  }
  .button-group .button {
    margin-top: 0; // then undo the margin here so we don't accidentally double it
  }
}

// navigationbar forms
.navigationbar-form {
  margin-bottom: 0; // remove default bottom margin
  .clearfix();
  input,
  select,
  .radio,
  .checkbox {
    .navigationbarVerticalAlign(30px); // Vertically center in navigationbar
  }
  input,
  select {
    display: inline-block;
    margin-bottom: 0;
  }
  input[type="image"],
  input[type="checkbox"],
  input[type="radio"] {
    margin-top: 3px;
  }
  .input-append,
  .input-prepend {
    margin-top: 6px;
    white-space: nowrap; // preven two  items from separating within a .navigationbar-form that has .pull-left
    input {
      margin-top: 0; // remove the margin on top since it's on the parent
    }
  }
}

// navigationbar search
.navigationbar-search {
  position: relative;
  float: left;
  .navigationbarVerticalAlign(28px); // Vertically center in navigationbar
  margin-bottom: 0;
  .search-query {
    padding: 4px 9px;
    #font > .sans-serif(13px, normal, 1);
    color: @white;
    background-color: @navigationbarSearchBackground;
    border: 1px solid @navigationbarSearchBorder;
    @shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.15);
    .box-shadow(@shadow);
    .transition(none);

    // Placeholder text gets special styles; can't be a grouped selector
    &:-moz-placeholder {
      color: @navigationbarSearchPlaceholderColor;
    }
    &::-webkit-input-placeholder {
      color: @navigationbarSearchPlaceholderColor;
    }

    // Focus states (we use .focused since IE7-8 and down doesn't support :focus)
    &:focus,
    &.focused {
      padding: 5px 10px;
      color: @grayDark;
      text-shadow: 0 1px 0 @white;
      background-color: @navigationbarSearchBackgroundFocus;
      border: 0;
      .box-shadow(0 0 3px rgba(0,0,0,.15));
      outline: 0;
    }
  }
}


.navigationbar-fixed-top,
.navigationbar-fixed-bottom {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: @zindexFixedNavigationbar;
  margin-bottom: 0; // remove 18px margin for static navigationbar
}

.navigationbar-fixed-top .navigationbar-inner,
.navigationbar-fixed-bottom .navigationbar-inner {
  padding-left: 0;
  padding-right: 0;
  .border-radius(0);
}

.navigationbar-fixed-top .container,
.navigationbar-fixed-bottom .container {
  #grid > .core > .column(@gridColumns);
}

// Fixed to top
.navigationbar-fixed-top {
  top: 0;
}

// Fixed to bottom
.navigationbar-fixed-bottom {
  bottom: 0;
}


.navigationbar .navigation {
  position: relative;
  left: 0;
  display: block;
  float: left;
  margin: 0 10px 0 0;
}

.navigationbar .navigation.pull-right {
  float: right; // redeclare due to specificity
}

.navigationbar .navigation > li {
  display: block;
  float: left;
}

// Links
.navigationbar .navigation > li > a {
  float: none;
  padding: 10px 10px 11px;
  line-height: 19px;
  color: @navigationbarLinkColor;
  text-decoration: none;
  text-shadow: 0 -1px 0 rgba(0,0,0,.25);
}
// Hover
.navigationbar .navigation > li > a:hover {
  background-color: @navigationbarLinkBackgroundHover; // "transparent" is default to differentiate :hover from .active
  color: @navigationbarLinkColorHover;
  text-decoration: none;
}

// Active navigation items
.navigationbar .navigation .active > a,
.navigationbar .navigation .active > a:hover {
  color: @navigationbarLinkColorActive;
  text-decoration: none;
  background-color: @navigationbarLinkBackgroundActive;
}

// Dividers (basically a vertical hr)
.navigationbar .divider-vertical {
  height: @navigationbarHeight;
  width: 1px;
  margin: 0 9px;
  overflow: hidden;
  background-color: @navigationbarBackground;
  border-right: 1px solid @navigationbarBackgroundHighlight;
}

// Secondary (floated right) navigation in topbar
.navigationbar .navigation.pull-right {
  margin-left: 10px;
  margin-right: 0;
}

